<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
		test();
			function test(){
				
				var d = prompt("请输入圆的直径:");
				console.log("圆的周长为"+(3.14*d));	
				console.log("圆的面积为"+(3.14*Math.pow(d,2)/4));	
			}
		</script>
	</body>
</html>
